<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<style>
    * {
        margin: 0;
        padding: 0;
    }
    html,body{
        height: 2000px;
        scroll-behavior: smooth;
    }

    .box {
        overflow: hidden;
        margin-left: 30px;
    }

    .box label {
        display: block;
        float: left;
        width: 100px;
        height: 50px;
        line-height: 50px;
        font-size: 18px;
        color: #fff;
        background-color: #ddd;
        cursor: pointer;
    }

    .box1 {
        width: 400px;
        height: 300px;
        overflow: hidden;
        margin-left: 30px;
        scroll-behavior:inherit;
    }

    .box1 .content {
        position: relative;
        width: 400px;
        height: 300px;
    }

    .box1 .content input {
        position: absolute;
        top: 0;
        height: 100%;
        width: 1px;
        border: 0;
        outline: none;
        clip: rect(0, 0, 0, 0)
    }
    #back{
        position: fixed;
        bottom: 20px;
        right: 30px;
    }
</style>

<body>
    <div class="box">
        <label for="one">table 1</label>
        <label for="two">table 2</label>
        <label for="three">table 3</label>
        <label for="four">table4 </label>
    </div>
    <div class="box1">
        <div class="content">
            <input type="text" id="one">
            <p>hello 第1个盒子</p>
            <img src=""
                alt="">
        </div>
        <div class="content">
            <input type="text" id="two">
            <p>hello 第2个盒子</p>
            <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcT4dzJnYvTy6hHQb_JCxP8T8K9bw7xtdbI5rf3-OqEeu22sGGgs"
                alt="">
        </div>
        <div class="content">
            <input type="text" id="three">
            <p>hello 第3个盒子</p>
            <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS5cA1RTUJCyjfPnqAcE7tM_4eEP08YOH4acRyC_StiLqeeJkp5" alt="">
        </div>
        <div class="content">
            <input type="text" id="four">
            <p>hello 第4个盒子</p>
            <img  src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcT2giVEtf-sJ9xgKz_1tGhtaYixwXiBBIBYc2BokGEG4XLVDuks"  alt="">
        </div>
    </div>
    <a href="#" id="back">返回顶部</a>
</body>

</html>